Even More Principal Typings for Java-like Languages

نویسندگان

  • Davide Ancona
  • Ferruccio Damiani
  • Sophia Drossopoulou
  • Elena Zucca
چکیده

We propose a new type system for Java-like languages which allows compilation of a class in isolation, that is, in a context where no information is available on other classes. Indeed, by this type system it is possible to infer the assumptions guaranteeing type correctness of a class c, and generate (abstract) bytecode for c, by just inspecting the source code of c. Then, a collection of classes can be safely linked together without further inspection of the classes’ code, provided that each class has been typechecked in isolation (intra-checking), and that the mutual class assumptions are satisfied (inter-checking). In other words, the type systems supports compositional analysis, as formally guaranteed by the fact that it has principal typings. We also develop an algorithm for inter-checking, and prove it correct.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Stronger Typings for Smarter Recompilation of Java-like Languages

We define an algorithm for smarter recompilation of a small but significant Java-like language; such an algorithm is inspired by a type system previously defined by Ancona and Zucca. In comparison with all previous type systems for Java-like languages, this system enjoys the principal typings property, and is based on the two novel notions of local type assumption and entailment of type environ...

متن کامل

Resolving of Intersection Types in Java

In the past we analyzed typeless Java programs. One of our results was, that there may be different correct typings for one method. This means that the principal types of such methods are intersection types. We presented a type-inference algorithm. For typeless Java methods the algorithm infers its principal intersection type. Unfortunately, like Java byte-code, Java does not allow intersection...

متن کامل

Principality and type inference for intersection types using expansion variables

Principality of typings is the property that for each typable term, there is a typing from which all other typings are obtained via some set of operations. Type inference is the problem of finding a typing for a given term, if possible. We define an intersection type system which has principal typings and types exactly the strongly normalizable λ-terms. More interestingly, every finite-rank res...

متن کامل

Stronger Typings for Separate Compilation of Java - like Languages ( Extended

We define a formal system supporting separate compilation for a small but significant Java-like language. This system is proved to be stronger than the standard compilation of both Java and C#, in the sense that it better supports software reuse by avoiding unnecessary recompilation steps after code modification which are usually performed by using the standard compilers. This is achieved by in...

متن کامل

Sound and complete inter-checking The very essence of principal typings

This paper brings together the two notions of inter-checking and principal typing , due in their more general formulation to Cardelli and Wells, respectively. Despite a deep interconnection between these two notions is commonly recognized, this is the first attempt at rigorously studying and establishing a relation between them. To this aim, we formalize the notion of sound and complete inter-c...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2004